package com.xgq.drink.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 优惠领取表
 * </p>
 *
 * @author xgq
 * @since 2025-03-04
 */
@Getter
@Setter
@TableName("discount_claim")
public class DiscountClaim implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 领取记录ID
     */
    @TableId(value = "claim_id", type = IdType.AUTO)
    private Long claimId;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 优惠ID
     */
    private Long discountId;

    /**
     * 用户领取次数
     */
    private Integer claimCount;

    /**
     * 领取时间
     */
    private LocalDateTime claimedAt;

    private Integer status;
    /**
     * 优惠信息（不映射到数据库表中）
     */
    @TableField(exist = false)
    private DiscountInfo discountInfo;
}
